package com.example.replacebooks.mapper;

import com.example.replacebooks.entity.Class;
import com.example.replacebooks.entity.Params;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.springframework.stereotype.Repository;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;

@Repository
public interface ClassMapper extends Mapper<Class> {
    List<Class> findBySearch(@Param("params") Params params);

    @Select("select * from class where classid = #{classid} limit 1")
    Class findByClassid(@Param("classid") Integer classid);

    @Update("update class set classid = #{classid},classname = #{classname}")
    void updateByuserid(Class clas);

}

